from django.db import models


class Area(models.Model):
    name = models.CharField(max_length=88, unique=True, verbose_name="区域名称")
    superior = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, blank=True, related_name="subs", verbose_name="上级行政单位")

    class Meta:
        ordering = ('name',)
        verbose_name = "行政区域"
        verbose_name_plural = "行政区域"

    def __str__(self):
        return self.name
